package org.codeart.map.service;

import org.codeart.common.response.TerminalResponse;
import org.codeart.common.response.TraceSearchResponse;
import org.codeart.map.remote.TerminalClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Service
public class TerminalService {

    @Autowired
    private TerminalClient terminalClient;

    /**
     * 添加终端
     * @param name 名称
     * @return TerminalResponse
     */
    public TerminalResponse add(String name, String desc) {
        return terminalClient.add(name, desc);
    }
    
    public List<TerminalResponse> aroundSearch(String center, Integer radius) {
        return terminalClient.aroundSearch(center, radius);
    }
    
    public TraceSearchResponse traceSearch(String tid, Long startTime, Long endTime) {
        return terminalClient.traceSearch(tid, startTime, endTime);
    }

}
